<!-- 定制导航栏 -->
<script>
    var navBar = document.getElementById('navList');
    function addNav(linkName, linkClassName, linkHref, linkLocation, isExternalLinks){
        var navigation = document.createElement("li");
        var navigationLink = document.createElement("a");

        navigationLink.class = "menu";
        navigationLink.id = linkClassName;
        navigationLink.href = linkHref;
        if (isExternalLinks) {
            navigationLink.target="_blank";
        }
        var navigationName = document.createTextNode(linkName);
        navigationLink.appendChild(navigationName);

        navigation.appendChild(navigationLink);
        var navigations = navBar.getElementsByTagName("li");
        if (linkLocation > navigations.length && linkLocation > 0){
            navBar.appendChild(navigation);
        } else {
            navBar.insertBefore(navigation, navigations[linkLocation-1]);
        }
    }
    addNav("Gitee","blog_nav_gitee","https://gitee.com/kancy666", 8, true);
    addNav("GitHub","blog_nav_github","https://github.com/huangchengkang", 9, true);
</script>